class Page11 extends BaseScreen {
    public constructor() {
        super();
        this.skinName = "resource/eui_skins/Page11Skin.exml";
    }

	private img_1: eui.Image;
    private img_2: eui.Image;
    private img_3: eui.Image;
    private img_4: eui.Image;
	private img_5: eui.Image;
	private img_6: eui.Image;
	private img_7: eui.Image;
	private img_8: eui.Image;
	private img_9: eui.Image;
	private img_10: eui.Image;
	private img_10_y:number = 0;
    private img_5_y:number = 0;
    private img_6_y:number = 0;
    private img_7_y:number = 0;
    private img_8_y:number = 0;
    private img_4_x:number = 0;
    protected childrenCreated(): void {
        super.childrenCreated();
        this.img_4_x = this.img_4.x;
        this.init_view();
        this.resetui();
    }

    public resetui(){
        this.img_1.alpha = 0;
        this.img_2.alpha = 0;
		this.img_3.x = -this.img_3.width;
		this.img_4.x = 640;

		this.img_5.mask = this['mask_5'];
		this.img_6.mask = this['mask_6'];
        this.img_5.y = this.img_5_y+this.img_5.height;
        this.img_6.y = this.img_6_y+this.img_6.height;
		


        if(this.xx_page){
            this.xx_page.stop();
        }
    }

    public init_view() {
        this.img_5_y = this.img_5.y;
        this.img_6_y = this.img_6.y;

        this.showPage();
    }

    public showPage() {
        super.showPage();
        this.resetui();

        egret.Tween.get(this.img_1).to({ alpha:1}, 2000);

        egret.Tween.get(this.img_2).wait(300).to({ alpha:1}, 700, egret.Ease.backOut);
        egret.Tween.get(this.img_3).wait(600).to({ x:0}, 400);
        egret.Tween.get(this.img_4).wait(600).to({ x:this.img_4_x}, 400);

		egret.Tween.get(this.img_5).wait(600).to({ y:this.img_5_y}, 1100, egret.Ease.backOut);
		egret.Tween.get(this.img_6).wait(900).to({ y:this.img_6_y}, 1100, egret.Ease.backOut);

        if(this.xx_page){
            this.xx_page.start();
        }
    }

    public resize(): void {
         super.resize();
    }

}